<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:s="clr-namespace:System;assembly=mscorlib"
                    xmlns:sllb="http://schemas.xceed.com/silverlight/xaml/listbox">

   <!-- =================================================================== -->
   <!-- Resources specific to this Theme/ColorScheme                        -->
   <!-- =================================================================== -->

   <sllb:DividendDivisorToCeilingQuotientConverter x:Key="Excel2007BlueThemeDividendDivisorToCeilingQuotientConverter" />

   <LinearGradientBrush x:Key="Excel2007BlueThemeListBoxGroupHearderItemBackgroundBrush"
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
      <GradientStop Color="#EBEDEF"
                    Offset="1" />

      <GradientStop Color="#FBFBFB"
                    Offset="0" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeFilterControlButtonDefaultBackgroundBrush"
                        StartPoint="0.5,0"
                        EndPoint="0.5,1">
      <GradientStop Color="#FFFBFBFB"
                    Offset="0" />

      <GradientStop Color="#FFD6DBDF"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeClearFilterControlButtonPressedBackgroundBrush"
                        StartPoint="0.5,0"
                        EndPoint="0.5,1.04">
      <GradientStop Color="#FFe1ecf6"
                    Offset="0" />

      <GradientStop Color="#FFd5e5f2"
                    Offset="0.3" />

      <GradientStop Color="#FFaecee8"
                    Offset="0.5" />

      <GradientStop Color="#FF75abd8"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeClearFilterControlButtonDefaultBorderBrush"
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
      <GradientStop Color="#FFCFD0D0"
                    Offset="0" />

      <GradientStop Color="#FFC9CACA"
                    Offset="1" />
   </LinearGradientBrush>

   <SolidColorBrush x:Key="Excel2007BlueThemeLoadingSpinnerShadowBackgroundBrush"
                    Color="#FF616161" />

   <SolidColorBrush x:Key="Excel2007BlueThemeLoadingSpinnerHighlightBackgroundBrush"
                    Color="#BADDE9" />

   <LinearGradientBrush x:Key="Excel2007BlueThemeListBoxDefaultBorderBrush"
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
      <GradientStop Color="#FFA3AEB9"
                    Offset="0" />
      <GradientStop Color="#FF8399A9"
                    Offset="0.375" />
      <GradientStop Color="#FF718597"
                    Offset="0.375" />
      <GradientStop Color="#FF617584"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeToolPaneBackgroundBrush"
                        StartPoint="0,0"
                        EndPoint="0,1">
      <GradientStop Offset="0"
                    Color="#F9FCFD" />

      <GradientStop Offset="1"
                    Color="#D3DBE9" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeGroupNavigationControlButtonPressedBackgroundBrush"
                        StartPoint="0.5,0"
                        EndPoint="0.5,1.04">
      <GradientStop Color="#FFe1ecf6"
                    Offset="0" />

      <GradientStop Color="#FFd5e5f2"
                    Offset="0.3" />

      <GradientStop Color="#FFaecee8"
                    Offset="0.5" />

      <GradientStop Color="#FF75abd8"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeGroupNavigationControlButtonDefaultBorderBrush"
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
      <GradientStop Color="#FFCFD0D0"
                    Offset="0" />

      <GradientStop Color="#FFC9CACA"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeGroupNavigationControlButtonDefaultBackgroundBrush"
                        StartPoint="0.5,0"
                        EndPoint="0.5,1">
      <GradientStop Color="#FFFBFBFB"
                    Offset="0" />

      <GradientStop Color="#FFD6DBDF"
                    Offset="1" />
   </LinearGradientBrush>

   <LinearGradientBrush x:Key="Excel2007BlueThemeSelectionBackgroundBrush"
                        StartPoint="0.5,0"
                        EndPoint="0.5,1">
      <GradientStop Color="#FFF9D99F"
                    Offset="0" />
      <GradientStop Color="#FFF1C15F"
                    Offset="1" />
   </LinearGradientBrush>

   <SolidColorBrush x:Key="Excel2007BlueThemeBorderBrush"
                    Color="#9EB6CE" />

   <Style x:Key="Excel2007BlueThemeLicensingStateRichTextBoxStyle"
          TargetType="RichTextBox">
      <Setter Property="HorizontalAlignment"
              Value="Left" />
      <Setter Property="TextWrapping"
              Value="Wrap" />
      <Setter Property="FontSize"
              Value="13.333" />
      <Setter Property="Foreground"
              Value="White" />
      <Setter Property="VerticalAlignment"
              Value="Top" />
      <Setter Property="IsReadOnly"
              Value="True" />
      <Setter Property="IsTabStop"
              Value="False" />
      <Setter Property="CaretBrush"
              Value="Transparent" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="RichTextBox">
               <Border x:Name="ContentElement"
                       Background="Transparent"
                       BorderBrush="Transparent"
                       BorderThickness="0" />
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <DataTemplate x:Key="Excel2007BlueThemeDataNavigationIcon">
      <Grid HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Margin="0">
         <Grid.Effect>
            <DropShadowEffect BlurRadius="2"
                              ShadowDepth="1"
                              Color="White" />
         </Grid.Effect>
         <Grid.RowDefinitions>
            <RowDefinition Height="4" />
            <RowDefinition Height="3" />
            <RowDefinition Height="4" />
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5" />
            <ColumnDefinition Width="7" />
            <ColumnDefinition Width="5" />
         </Grid.ColumnDefinitions>
         <Rectangle StrokeThickness="0"
                    Fill="#FFC1CBD7"
                    Width="5"
                    Height="3"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="0,0,0,1" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFC1CBD7"
                    Width="5"
                    Height="3"
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="1,0,1,1" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFC1CBD7"
                    Width="5"
                    Height="3"
                    Margin="0,0,0,1"
                    Grid.Column="2"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFB1BDCD"
                    Width="5"
                    Height="3"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Grid.Row="1" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFB1BDCD"
                    Width="5"
                    Height="3"
                    Grid.Row="1"
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="1,0" />
         <Rectangle StrokeThickness="0"
                    Fill="#FF1A69D6"
                    Width="5"
                    Height="3"
                    Grid.Row="1"
                    Grid.Column="2"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="0" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFA4B2C5"
                    Width="5"
                    Height="3"
                    Grid.Row="2"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="0,1,0,0" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFA4B2C5"
                    Width="5"
                    Height="3"
                    Grid.Row="2"
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Margin="1,1,1,0" />
         <Rectangle StrokeThickness="0"
                    Fill="#FFA4B2C5"
                    Width="5"
                    Height="3"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Grid.Row="2"
                    Grid.Column="2"
                    Margin="0,1,0,0" />
      </Grid>
   </DataTemplate>

   <Style x:Key="Excel2007BlueThemeNavigationButtonStyle"
          TargetType="Button">
      <Setter Property="Foreground"
              Value="#6B6A6B" />

      <Setter Property="Height"
              Value="21" />

      <Setter Property="Width"
              Value="29" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="Button">
               <Grid x:Name="grid">
                  <VisualStateManager.VisualStateGroups>
                     <VisualStateGroup x:Name="CommonStates">
                        <VisualStateGroup.Transitions>
                           <VisualTransition GeneratedDuration="00:00:00.200" />

                           <VisualTransition From="MouseOver"
                                             To="Pressed" />
                        </VisualStateGroup.Transitions>

                        <VisualState x:Name="Normal" />

                        <VisualState x:Name="MouseOver">
                           <Storyboard>
                              <DoubleAnimation Duration="00:00:00.000"
                                               To="1"
                                               Storyboard.TargetProperty="(UIElement.Opacity)"
                                               Storyboard.TargetName="Over" />
                           </Storyboard>
                        </VisualState>

                        <VisualState x:Name="Pressed">
                           <Storyboard>
                              <DoubleAnimation Duration="00:00:00.000"
                                               To="1"
                                               Storyboard.TargetProperty="(UIElement.Opacity)"
                                               Storyboard.TargetName="Pressed1" />
                           </Storyboard>
                        </VisualState>

                        <VisualState x:Name="Disabled">
                           <Storyboard>
                              <DoubleAnimation Duration="00:00:00.000"
                                               To="1"
                                               Storyboard.TargetProperty="(UIElement.Opacity)"
                                               Storyboard.TargetName="grid" />

                              <DoubleAnimation Duration="00:00:00.000"
                                               To="0.5"
                                               Storyboard.TargetProperty="(UIElement.Opacity)"
                                               Storyboard.TargetName="contentPresenter" />
                           </Storyboard>
                        </VisualState>
                     </VisualStateGroup>

                     <VisualStateGroup x:Name="FocusStates">
                        <VisualState x:Name="Focused" />

                        <VisualState x:Name="Unfocused" />
                     </VisualStateGroup>
                  </VisualStateManager.VisualStateGroups>

                  <Border x:Name="Background"
                          BorderThickness="{TemplateBinding BorderThickness}">
                     <Border.BorderBrush>
                        <LinearGradientBrush EndPoint="0.5,1"
                                             StartPoint="0.5,0">
                           <GradientStop Color="#FFB6CADE"
                                         Offset="1" />

                           <GradientStop Color="#FF83A1BE" />
                        </LinearGradientBrush>
                     </Border.BorderBrush>

                     <Border.Background>
                        <LinearGradientBrush StartPoint="0.5,0"
                                             EndPoint="0.5,1">
                           <GradientStop Color="#FFF6F9FB"
                                         Offset="0" />

                           <GradientStop Color="#FFD3DBE8"
                                         Offset="1" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>

                  <Border x:Name="Over"
                          Opacity="0"
                          BorderThickness="1">
                     <Border.Background>
                        <LinearGradientBrush StartPoint="0.5,0"
                                             EndPoint="0.5,1">
                           <GradientStop Color="#FFDDE0E3"
                                         Offset="0" />

                           <GradientStop Color="#FFBCC5D2"
                                         Offset="1" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>

                  <Border x:Name="Pressed1"
                          Opacity="0"
                          Background="#FF9DC1E4"
                          BorderThickness="1" />

                  <ContentPresenter x:Name="contentPresenter"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Content="{TemplateBinding Content}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Margin="{TemplateBinding Padding}" />
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!--**************************
    * STYLE: ScrollViewer
    ************************** -->
   <Style TargetType="ScrollViewer"
          x:Key="Excel2007BlueThemeScrollViewerStyle">

      <Setter Property="HorizontalContentAlignment"
              Value="Left" />

      <Setter Property="VerticalContentAlignment"
              Value="Top" />

      <Setter Property="VerticalScrollBarVisibility"
              Value="Visible" />

      <Setter Property="BorderBrush"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="Background"
              Value="Transparent" />
   </Style>

   <!--**************************
    * TEMPLATE: ListBox
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeListBoxTemplate"
                    TargetType="sllb:ListBox">
      <Border BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Background="{TemplateBinding Background}">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="ResquestStatus">

               <VisualState x:Name="NoPendingRequests" />

               <VisualState x:Name="RequestsPending">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="loadingIndicator"
                                                    Storyboard.TargetProperty="RequestsPending">
                        <DiscreteObjectKeyFrame KeyTime="00:00:00.0">
                           <DiscreteObjectKeyFrame.Value>
                              <s:Boolean>
                                 True
                              </s:Boolean>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>

               <VisualStateGroup.Transitions>
                  <VisualTransition From="RequestsPending"
                                    To="NoPendingRequests">
                     <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="loadingIndicator"
                                                       Storyboard.TargetProperty="RequestsPending">
                           <DiscreteObjectKeyFrame KeyTime="00:00:00.0">
                              <DiscreteObjectKeyFrame.Value>
                                 <s:Boolean>
                                    False
                                 </s:Boolean>
                              </DiscreteObjectKeyFrame.Value>
                           </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                     </Storyboard>
                  </VisualTransition>
               </VisualStateGroup.Transitions>
            </VisualStateGroup>

            <VisualStateGroup x:Name="LicensingStates">
               <VisualState x:Name="Licensed" />

               <VisualState x:Name="NotLicensed">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="licensingMessage"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="DataNavigationPaneStates">
               <VisualState x:Name="DataNavigationPaneHidden">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="DataNavPane"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0"
                                      Duration="00:00:00.150" />

                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DataNavPane"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.150">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>


               <VisualState x:Name="DataNavigationPaneVisible">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="DataNavPane"
                                      Storyboard.TargetProperty="Opacity"
                                      From="0"
                                      To="1"
                                      Duration="00:00:00.150" />

                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DataNavPane"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <Grid>
            <Grid.ColumnDefinitions>
               <ColumnDefinition />
               <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="Auto" />
               <RowDefinition />
            </Grid.RowDefinitions>
            <Grid Grid.Column="0"
                  Grid.ColumnSpan="2"
                  Grid.Row="0"
                  Height="50"
                  Background="{StaticResource Excel2007BlueThemeToolPaneBackgroundBrush}"
                  Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ToolPaneVisibility}">
               <sllb:FilterControl x:Name="FilterControl"
                                   HorizontalAlignment="Left"
                                   VerticalAlignment="Center"
                                   Margin="10,0,0,0"
                                   Width="225"
                                   DataSourceFilterExpression="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=FilterExpression, Mode=TwoWay}"
                                   sllb:SearchTextBox.FilteredFieldNames="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.FilteredFieldNames)}"
                                   sllb:SearchTextBox.TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.TooComplexText)}" />
               <Rectangle Height="1"
                          VerticalAlignment="Bottom"
                          Fill="#FF8399A9" />
            </Grid>

            <ScrollViewer x:Name="ScrollViewer"
                          IsTabStop="False"
                          TabNavigation="Once"
                          Grid.Column="0"
                          Grid.Row="1"
                          HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
                          VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
                          Padding="{TemplateBinding Padding}"
                          Style="{StaticResource Excel2007BlueThemeScrollViewerStyle}">
               <sllb:ItemsPresenter />
            </ScrollViewer>

            <sllb:LoadingIndicator x:Name="loadingIndicator"
                                   Grid.Column="0"
                                   Grid.Row="1" />

            <Grid x:Name="licensingMessage"
                  Grid.RowSpan="3"
                  Grid.ColumnSpan="2"
                  Visibility="Collapsed"
                  Background="#80FFFFFF">
               <Grid HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Width="250">
                  <Grid.RowDefinitions>
                     <RowDefinition Height="0.27*" />
                     <RowDefinition Height="1" />
                     <RowDefinition Height="0.69*" />
                  </Grid.RowDefinitions>
                  <Border CornerRadius="6"
                          Grid.RowSpan="3">
                     <Border.Background>
                        <LinearGradientBrush EndPoint="0.5,1"
                                             StartPoint="0.5,0">
                           <GradientStop Color="#FFCA4800"
                                         Offset="1" />
                           <GradientStop Color="#FFFF9B09" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>
                  <Border BorderBrush="#66000000"
                          BorderThickness="1"
                          CornerRadius="6"
                          Grid.RowSpan="3" />
                  <Border BorderBrush="#33FFFFFF"
                          BorderThickness="1"
                          CornerRadius="5"
                          Margin="1"
                          Grid.RowSpan="3" />
                  <Border Opacity="0.08"
                          CornerRadius="6"
                          Grid.RowSpan="3">
                     <Border.Background>
                        <LinearGradientBrush StartPoint="-0.015,0.1"
                                             EndPoint="9.187,9.236"
                                             SpreadMethod="Repeat"
                                             MappingMode="Absolute">
                           <GradientStop Offset="0"
                                         Color="Transparent" />
                           <GradientStop Color="Transparent"
                                         Offset="0.5" />
                           <GradientStop Offset="0.5"
                                         Color="White" />
                           <GradientStop Offset="1"
                                         Color="White" />
                        </LinearGradientBrush>
                     </Border.Background>
                  </Border>
                  <Border Background="#66000000"
                          Grid.Row="1"
                          Margin="10,0" />
                  <TextBlock HorizontalAlignment="Left"
                             Margin="10,6,0,0"
                             TextWrapping="Wrap"
                             Text="Invalid License / Trial Expired"
                             VerticalAlignment="Bottom"
                             Foreground="White"
                             FontSize="16" />
                  <RichTextBox Style="{StaticResource Excel2007BlueThemeLicensingStateRichTextBoxStyle}"
                               Margin="10,6,0,10"
                               Grid.Row="2">
                     <Paragraph>
                        <Run>A valid license key must be provided in order to license Xceed Ultimate ListBox for Silverlight. Refer to the</Run>
                        <Hyperlink NavigateUri="http://doc.xceedsoft.com/products/XceedSilverlightListBox/Licensing.html"
                                   TargetName="_blank"
                                   Foreground="White"
                                   MouseOverForeground="#550000">Licensing topic</Hyperlink>
                        <Run>in the documentation for more information.</Run>
                     </Paragraph>
                  </RichTextBox>
               </Grid>
            </Grid>

            <Grid x:Name="DataNavPane"
                  Visibility="Collapsed"
                  Grid.Row="1"
                  Grid.RowSpan="2">

               <Grid.RowDefinitions>
                  <RowDefinition Height="32" />
                  <RowDefinition />
               </Grid.RowDefinitions>
               <Border Background="{StaticResource Excel2007BlueThemeListBoxGroupHearderItemBackgroundBrush}"
                       Grid.RowSpan="2" />

               <sllb:DataNavigationControl x:Name="DataNavControl"
                                           DataNavigationHost="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                           Grid.Row="1" />

               <Button x:Name="HidePaneButton"
                       Grid.Row="0"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Top"
                       Padding="5"
                       Margin="5"
                       Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                       Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HideDataNavigationPaneCommand}">
                  <Path Height="9.33"
                        Width="9.33"
                        Stretch="Fill"
                        Data="M 7.333343505859375,-0.6666641235351562 C7.333343505859375,-0.6666641235351562 4,2.6650009155273438 4,2.6650009155273438 4,2.6650009155273438 0.666656494140625,-0.6666641235351562 0.666656494140625,-0.6666641235351562 0.666656494140625,-0.6666641235351562 -0.666656494140625,0.6666641235351562 -0.666656494140625,0.6666641235351562 -0.666656494140625,0.6666641235351562 2.665008544921875,4 2.665008544921875,4 2.665008544921875,4 -0.666656494140625,7.333335876464844 -0.666656494140625,7.333335876464844 -0.666656494140625,7.333335876464844 0.666656494140625,8.666664123535156 0.666656494140625,8.666664123535156 0.666656494140625,8.666664123535156 4,5.334999084472656 4,5.334999084472656 4,5.334999084472656 7.333343505859375,8.666664123535156 7.333343505859375,8.666664123535156 7.333343505859375,8.666664123535156 8.666656494140625,7.333335876464844 8.666656494140625,7.333335876464844 8.666656494140625,7.333335876464844 5.334991455078125,4 5.334991455078125,4 5.334991455078125,4 8.666656494140625,0.6666641235351562 8.666656494140625,0.6666641235351562 8.666656494140625,0.6666641235351562 7.333343505859375,-0.6666641235351562 7.333343505859375,-0.6666641235351562 z"
                        Fill="#A6A6A6" />
               </Button>
            </Grid>
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: ListBoxItem
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeListBoxItemTemplate"
                    TargetType="sllb:ListBoxItem">
      <Grid Background="{TemplateBinding Background}">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="MouseOver" />
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="SelectionStates">
               <VisualState x:Name="Unselected" />
               <VisualState x:Name="Selected">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="fillColor"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="0" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>
            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Focused">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="0">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Unfocused" />
            </VisualStateGroup>
            <VisualStateGroup x:Name="LoadingStates">
               <VisualState x:Name="Loaded">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="00:00:00.500"
                                      To="1" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Loading">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To="0" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

         </VisualStateManager.VisualStateGroups>
         <Rectangle x:Name="fillColor"
                    Opacity="0"
                    Fill="{StaticResource Excel2007BlueThemeSelectionBackgroundBrush}"
                    IsHitTestVisible="False"
                    RadiusX="1"
                    RadiusY="1" />
         <ContentPresenter x:Name="contentPresenter"
                           Content="{TemplateBinding Content}"
                           ContentTemplate="{TemplateBinding ContentTemplate}"
                           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                           Margin="{TemplateBinding Padding}" />
         <Rectangle x:Name="FocusVisualElement"
                    Stroke="#FFF1C15F"
                    StrokeThickness="1"
                    Visibility="Collapsed"
                    RadiusX="1"
                    RadiusY="1" />
      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: ListBoxGroupHeader
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeListBoxGroupHeaderTemplate"
                    TargetType="sllb:ListBoxGroupHeader">
      <Grid>
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Normal" />
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="SelectionStates">
               <VisualState x:Name="Unselected" />
               <VisualState x:Name="SelectedUnfocused" />
               <VisualState x:Name="Selected" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="LoadingStates">
               <VisualState x:Name="Loaded">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="00:00:00.0"
                                      To="1" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Loading">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="contentPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To="0" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="LayoutModeStates">
               <VisualState x:Name="Vertical" />
               <VisualState x:Name="Horizontal">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalLayoutGrid"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                     <ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalLayoutGrid"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Duration="00:00:0.0">
                        <DiscreteObjectKeyFrame KeyTime="00:00:0.0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Floating" />
            </VisualStateGroup>

         </VisualStateManager.VisualStateGroups>
         <Grid x:Name="VerticalLayoutGrid"
               Visibility="Visible">
            <Border x:Name="rootBorder"
                    Background="{TemplateBinding Background}">

               <sllb:HierarchicalGroupValueControl x:Name="contentPresenter"
                                                   Margin="{TemplateBinding Padding}"
                                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                   GroupValueDataTemplates="{TemplateBinding GroupValueDataTemplates}"
                                                   ItemsSource="{Binding Path=FieldNameValuePairs}"
                                                   sllb:ListBoxContainer.LayoutMode="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:ListBoxContainer.LayoutMode)}">
                  <sllb:HierarchicalGroupValueControl.ItemsPanel>
                     <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                     </ItemsPanelTemplate>
                  </sllb:HierarchicalGroupValueControl.ItemsPanel>
               </sllb:HierarchicalGroupValueControl>
            </Border>
            <StackPanel Orientation="Horizontal"
                        HorizontalAlignment="Right"
                        Margin="0,0,5,0">

               <Button Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                       ContentTemplate="{StaticResource Excel2007BlueThemeDataNavigationIcon}"
                       Margin="0,5,10,5"
                       Padding="5"
                       Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentListBox.ShowDataNavigationPaneCommand}" />

               <Button x:Name="PreviousButton"
                       BorderThickness="1"
                       IsTabStop="False"
                       Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToPreviousGroupCommand}"
                       Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                       Margin="0,5,3,5"
                       Padding="5">
                  <Path Margin="3,1"
                        RenderTransformOrigin="0.5,0.5"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="7"
                        Width="14"
                        Stretch="Fill"
                        Opacity="1"
                        Data="M 7,0 C7,0 0,7 0,7 0,7 14,7 14,7 14,7 7,0 7,0 z"
                        UseLayoutRounding="False">
                     <Path.Effect>
                        <DropShadowEffect BlurRadius="2"
                                          ShadowDepth="1"
                                          Color="White" />
                     </Path.Effect>
                     <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1"
                                             StartPoint="0.5,0">
                           <GradientStop Color="#FF9EADC1"
                                         Offset="1" />
                           <GradientStop Color="#FFC6CFDA" />
                        </LinearGradientBrush>
                     </Path.Fill>
                  </Path>
               </Button>

               <Button x:Name="NextButton"
                       IsTabStop="False"
                       Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToNextGroupCommand}"
                       Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                       Margin="0,5,0,5"
                       Padding="5">
                  <Path Margin="3,1"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Height="7"
                        Width="14"
                        Stretch="Fill"
                        Opacity="1"
                        Data="M 7,7 C7,7 14,0 14,0 14,0 0,0 0,0 0,0 7,7 7,7 z"
                        UseLayoutRounding="False">
                     <Path.Effect>
                        <DropShadowEffect BlurRadius="2"
                                          ShadowDepth="1"
                                          Color="White" />
                     </Path.Effect>
                     <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,1"
                                             StartPoint="0.5,0">
                           <GradientStop Color="#FF9EADC1"
                                         Offset="1" />
                           <GradientStop Color="#FFC6CFDA" />
                        </LinearGradientBrush>
                     </Path.Fill>
                  </Path>
               </Button>
            </StackPanel>

            <Border x:Name="groupLine"
                    Height="2"
                    Margin="4,0,4,0"
                    VerticalAlignment="Bottom"
                    Background="{StaticResource Excel2007BlueThemeBorderBrush}" />
         </Grid>

         <Grid x:Name="HorizontalLayoutGrid"
               Visibility="Collapsed">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="*" />
               <ColumnDefinition Width="40" />
               <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="*" />
               <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>

            <Border x:Name="HorizontalRootBorder"
                    Grid.RowSpan="2"
                    Grid.ColumnSpan="3"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{TemplateBinding Background}" />

            <Button x:Name="HorizontalPreviousButton"
                    Grid.Row="1"
                    Grid.Column="0"
                    BorderThickness="1"
                    IsTabStop="False"
                    Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToPreviousGroupCommand}"
                    Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}">
               <Path RenderTransformOrigin="0.5,0.5"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Height="15"
                     Width="7"
                     Stretch="Fill"
                     Opacity="1"
                     Data="M 306,597 C306,597 313,590 313,590 313,590 313,605 313,605 313,605 306,597 306,597 z"
                     UseLayoutRounding="False">
                  <Path.Effect>
                     <DropShadowEffect BlurRadius="2"
                                       ShadowDepth="1"
                                       Color="White" />
                  </Path.Effect>
                  <Path.Fill>
                     <LinearGradientBrush EndPoint="0.5,1"
                                          StartPoint="0.5,0">
                        <GradientStop Color="#FF9EADC1"
                                      Offset="1" />
                        <GradientStop Color="#FFC6CFDA" />
                     </LinearGradientBrush>
                  </Path.Fill>
               </Path>
            </Button>

            <Button x:Name="HorizontalNextButton"
                    Grid.Row="1"
                    Grid.Column="2"
                    IsTabStop="False"
                    Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NavigateToNextGroupCommand}"
                    Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                    Padding="5">
               <Path RenderTransformOrigin="0.5,0.5"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     Width="7"
                     Stretch="Fill"
                     Opacity="1"
                     Data="M 401,598 C401,598 394,605 394,605 394,605 394,590 394,590 394,590 401,598 401,598 z"
                     UseLayoutRounding="False">
                  <Path.Effect>
                     <DropShadowEffect BlurRadius="2"
                                       ShadowDepth="1"
                                       Color="White" />
                  </Path.Effect>
                  <Path.Fill>
                     <LinearGradientBrush EndPoint="0.5,1"
                                          StartPoint="0.5,0">
                        <GradientStop Color="#FF9EADC1"
                                      Offset="1" />
                        <GradientStop Color="#FFC6CFDA" />
                     </LinearGradientBrush>
                  </Path.Fill>
               </Path>
            </Button>

            <Button Style="{StaticResource Excel2007BlueThemeNavigationButtonStyle}"
                    Grid.Row="1"
                    Grid.Column="1"
                    ContentTemplate="{StaticResource Excel2007BlueThemeDataNavigationIcon}"
                    Padding="5"
                    Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ParentListBox.ShowDataNavigationPaneCommand}" />

            <sllb:HierarchicalGroupValueControl x:Name="HorizontalContentPresenter"
                                                Grid.Row="0"
                                                Grid.Column="0"
                                                Grid.ColumnSpan="3"
                                                Margin="{TemplateBinding Padding}"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                GroupValueDataTemplates="{TemplateBinding GroupValueDataTemplates}"
                                                ItemsSource="{Binding Path=FieldNameValuePairs}"
                                                sllb:ListBoxContainer.LayoutMode="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:ListBoxContainer.LayoutMode)}">
               <sllb:HierarchicalGroupValueControl.ItemsPanel>
                  <ItemsPanelTemplate>
                     <StackPanel Orientation="Vertical"></StackPanel>
                  </ItemsPanelTemplate>
               </sllb:HierarchicalGroupValueControl.ItemsPanel>
            </sllb:HierarchicalGroupValueControl>

         </Grid>
      </Grid>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: LoadingIndicator
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeLoadingIndicatorTemplate"
                    TargetType="sllb:LoadingIndicator">
      <Border x:Name="loadingGlyphBackground"
              IsHitTestVisible="False"
              Opacity="0">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="RequestStates">

               <VisualState x:Name="NoPendingRequests" />

               <VisualState x:Name="RequestsPending">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="loadingGlyphBackground"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.350" />
                     <DoubleAnimation Storyboard.TargetName="loadingGlyph"
                                      Storyboard.TargetProperty="Opacity"
                                      To="1"
                                      Duration="00:00:00.350" />
                  </Storyboard>
               </VisualState>

               <VisualStateGroup.Transitions>
                  <VisualTransition From="RequestsPending"
                                    To="NoPendingRequests">
                     <Storyboard>
                        <DoubleAnimation Storyboard.TargetName="loadingGlyphBackground"
                                         Storyboard.TargetProperty="Opacity"
                                         BeginTime="00:00:0.5"
                                         To="0"
                                         Duration="00:00:00.350" />
                        <DoubleAnimation Storyboard.TargetName="loadingGlyph"
                                         Storyboard.TargetProperty="Opacity"
                                         BeginTime="00:00:0.5"
                                         To="0"
                                         Duration="00:00:00.350" />
                     </Storyboard>
                  </VisualTransition>
               </VisualStateGroup.Transitions>
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <sllb:LoadingSpinner x:Name="loadingGlyph"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              Opacity="0"
                              Value="{TemplateBinding AnimatedValue}" />
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: LoadingSpinner
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeLoadingSpinnerTemplate"
                    TargetType="sllb:LoadingSpinner">
      <Border Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Width="40"
              Height="40">
         <Grid>
            <Grid.Resources>
               <sllb:RatioToOpacityConverter x:Key="ratioToOpacityConverter" />
            </Grid.Resources>

            <!-- Shadows -->
            <Border x:Name="14_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="336" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="13_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="312" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="12_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="288" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="11_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="264" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="10_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="240" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="09_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="216" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="08_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="192" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="07_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="168" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="06_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="144" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="05_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="120" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="04_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="96" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="03_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="72" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="02_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="48" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="01_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top">
               <Border.RenderTransform>
                  <RotateTransform Angle="24" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="00_Shadow"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ShadowBrush }"
                    Height="8"
                    VerticalAlignment="Top" />

            <!-- Highlights -->
            <Border x:Name="14"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=336}">
               <Border.RenderTransform>
                  <RotateTransform Angle="336" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="13"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=312}">
               <Border.RenderTransform>
                  <RotateTransform Angle="312" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="12"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=288}">
               <Border.RenderTransform>
                  <RotateTransform Angle="288" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="11"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=264}">
               <Border.RenderTransform>
                  <RotateTransform Angle="264" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="10"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=240}">
               <Border.RenderTransform>
                  <RotateTransform Angle="240" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="09"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=216}">
               <Border.RenderTransform>
                  <RotateTransform Angle="216" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="08"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=192}">
               <Border.RenderTransform>
                  <RotateTransform Angle="192" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="07"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=168}">
               <Border.RenderTransform>
                  <RotateTransform Angle="168" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="06"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=144}">
               <Border.RenderTransform>
                  <RotateTransform Angle="144" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="05"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=120}">
               <Border.RenderTransform>
                  <RotateTransform Angle="120" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="04"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=96}">
               <Border.RenderTransform>
                  <RotateTransform Angle="96" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="03"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=72}">
               <Border.RenderTransform>
                  <RotateTransform Angle="72" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="02"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=48}">
               <Border.RenderTransform>
                  <RotateTransform Angle="48" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="01"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    UseLayoutRounding="False"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=24}">
               <Border.RenderTransform>
                  <RotateTransform Angle="24" />
               </Border.RenderTransform>
            </Border>
            <Border x:Name="00"
                    HorizontalAlignment="Center"
                    Width="4"
                    RenderTransformOrigin="0.5,2.45"
                    CornerRadius="2.4"
                    Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=HighlightBrush }"
                    Height="8"
                    VerticalAlignment="Top"
                    Opacity="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Ratio, Converter={StaticResource ratioToOpacityConverter}, ConverterParameter=0}" />
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: DataNavigationControl
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeDataNavigationControlTemplate"
                    TargetType="sllb:DataNavigationControl">

      <Border Margin="{TemplateBinding Padding}">

         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="DataPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".55" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>
         <Grid>
            <ItemsPresenter x:Name="DataPresenter" />
         </Grid>
      </Border>
   </ControlTemplate>

   <!--**************************
    * TEMPLATE: DataNavigationItem
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeDataNavigationItemTemplate"
                    TargetType="sllb:DataNavigationItem">
      <Grid x:Name="grid">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualStateGroup.Transitions>
                  <VisualTransition GeneratedDuration="00:00:00.200" />

                  <VisualTransition From="MouseOver"
                                    To="Pressed" />
               </VisualStateGroup.Transitions>

               <VisualState x:Name="Normal" />

               <VisualState x:Name="MouseOver">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="mouseOver"
                                      Storyboard.TargetProperty="(UIElement.Opacity)"
                                      Duration="00:00:00.000"
                                      To="1" />

                     <ColorAnimation Storyboard.TargetName="contentPresenter"
                                     Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)"
                                     Duration="00:00:00.000"
                                     To="#FFD9E1EC" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="Pressed">
                  <Storyboard>
                     <ColorAnimation Storyboard.TargetName="contentPresenter"
                                     Storyboard.TargetProperty="(ContentControl.Foreground).(SolidColorBrush.Color)"
                                     Duration="00:00:00.000"
                                     To="White" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="grid"
                                      Storyboard.TargetProperty="(UIElement.Opacity)"
                                      Duration="00:00:00.000"
                                      To="0.5" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Focused" />

               <VisualState x:Name="Unfocused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <Border x:Name="background"
                 BorderThickness="{TemplateBinding BorderThickness}"
                 BorderBrush="{TemplateBinding BorderBrush}"
                 Background="{TemplateBinding Background}" />

         <Border x:Name="mouseOver"
                 Opacity="0"
                 BorderThickness="0"
                 Background="#FF7898C2" />

         <ContentControl x:Name="contentPresenter"
                         HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                         VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                         Foreground="{TemplateBinding Foreground}"
                         FontFamily="{TemplateBinding FontFamily}"
                         FontSize="{TemplateBinding FontSize}"
                         Content="{Binding}"
                         ContentTemplate="{TemplateBinding ContentTemplate}"
                         Margin="{TemplateBinding Padding}" />
      </Grid>
   </ControlTemplate>

   <!--**************************
    * STYLE: LoadingIndicator
    ************************** -->
   <Style x:Key="Excel2007BlueThemeLoadingIndicatorStyle"
          TargetType="sllb:LoadingIndicator">
      <Setter Property="FadeOutAnimationDuration"
              Value="850" />
      <Setter Property="AnimationDuration"
              Value="1000" />
      <Setter Property="VerticalContentAlignment"
              Value="Bottom" />
      <Setter Property="HorizontalContentAlignment"
              Value="Right" />
      <Setter Property="IsHitTestVisible"
              Value="False" />
      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeLoadingIndicatorTemplate}" />
   </Style>

   <!--**************************
    * STYLE: LoadingSpinner
    ************************** -->
   <Style x:Key="Excel2007BlueThemeLoadingSpinnerStyle"
          TargetType="sllb:LoadingSpinner">
      <Setter Property="Margin"
              Value="10" />
      <Setter Property="HighlightBrush"
              Value="{StaticResource Excel2007BlueThemeLoadingSpinnerHighlightBackgroundBrush}" />
      <Setter Property="ShadowBrush"
              Value="{StaticResource Excel2007BlueThemeLoadingSpinnerShadowBackgroundBrush}" />
      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeLoadingSpinnerTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBox
    ************************** -->
   <Style x:Key="Excel2007BlueThemeListBoxStyle"
          TargetType="sllb:ListBox">

      <Setter Property="BorderThickness"
              Value="1" />

      <Setter Property="BorderBrush"
              Value="{StaticResource Excel2007BlueThemeListBoxDefaultBorderBrush}" />

      <Setter Property="Background"
              Value="White" />

      <Setter Property="Foreground"
              Value="Black" />

      <Setter Property="Padding"
              Value="1" />

      <Setter Property="IsTabStop"
              Value="False" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeListBoxTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBoxItem
    ************************** -->
   <Style x:Key="Excel2007BlueThemeListBoxItemStyle"
          TargetType="sllb:ListBoxItem">

      <Setter Property="Padding"
              Value="3" />

      <Setter Property="MinHeight"
              Value="24" />

      <Setter Property="HorizontalContentAlignment"
              Value="Stretch" />

      <Setter Property="VerticalContentAlignment"
              Value="Stretch" />

      <Setter Property="Background"
              Value="Transparent" />

      <Setter Property="BorderThickness"
              Value="1" />

      <Setter Property="TabNavigation"
              Value="Local" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeListBoxItemTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBoxGroupHeader
    ************************** -->
   <Style x:Key="Excel2007BlueThemeListBoxGroupHeaderStyle"
          TargetType="sllb:ListBoxGroupHeader">
      <Setter Property="Background"
              Value="White" />

      <Setter Property="Foreground"
              Value="#7691B4" />

      <Setter Property="Padding"
              Value="5,0,0,0" />

      <Setter Property="MinHeight"
              Value="34" />

      <Setter Property="HorizontalContentAlignment"
              Value="Stretch" />

      <Setter Property="VerticalContentAlignment"
              Value="Center" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeListBoxGroupHeaderTemplate}" />
   </Style>

   <!--**************************
    * STYLE: ListBox
    ************************** -->
   <Style TargetType="sllb:ListBox"
          BasedOn="{StaticResource Excel2007BlueThemeListBoxStyle}" />

   <!--**************************
    * STYLE: ListBoxItem
    ************************** -->
   <Style TargetType="sllb:ListBoxItem"
          BasedOn="{StaticResource Excel2007BlueThemeListBoxItemStyle}" />

   <!--**************************
    * STYLE: ListBoxGroupHeader
    ************************** -->
   <Style TargetType="sllb:ListBoxGroupHeader"
          BasedOn="{StaticResource Excel2007BlueThemeListBoxGroupHeaderStyle}" />

   <!--**************************
    * STYLE: LoadingIndicator
    ************************** -->
   <Style TargetType="sllb:LoadingIndicator"
          BasedOn="{StaticResource Excel2007BlueThemeLoadingIndicatorStyle}" />

   <!--**************************
    * STYLE: LoadingSpinner
    ************************** -->
   <Style TargetType="sllb:LoadingSpinner"
          BasedOn="{StaticResource Excel2007BlueThemeLoadingSpinnerStyle}" />

   <Style x:Key="Excel2007BlueThemeClearFilterControlButtonStyle"
          TargetType="Button">

      <Setter Property="Cursor"
              Value="Hand" />

      <Setter Property="Padding"
              Value="5" />

      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="Button">
               <Grid x:Name="grid"
                     Background="Transparent">

                  <ContentPresenter x:Name="contentPresenter"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Content="{TemplateBinding Content}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Margin="{TemplateBinding Padding}" />
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style>

   <!--**************************
    * TEMPLATE: FilterControl
    ************************** -->
   <ControlTemplate x:Key="Excel2007BlueThemeFilterControlTemplate"
                    TargetType="sllb:FilterControl">
      <Grid x:Name="rootLayout">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />
               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="rootLayout"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0.5"
                                      Duration="0" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="MouseOver" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused" />
            </VisualStateGroup>
         </VisualStateManager.VisualStateGroups>

         <sllb:SearchTextBox x:Name="searchTextBox"
                             FilterExpression="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=UIFilterExpression, Mode=TwoWay}"
                             FilteredFieldNames="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.FilteredFieldNames)}"
                             TooComplexText="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(sllb:SearchTextBox.TooComplexText)}" />
      </Grid>
   </ControlTemplate>

   <!--**************************
    * STYLE: FilterControl
    ************************** -->
   <Style x:Key="Excel2007BlueThemeFilterControlStyle"
          TargetType="sllb:FilterControl">
      <Setter Property="ClearFilterButtonVisibility"
              Value="Collapsed" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeFilterControlTemplate}" />
   </Style>

   <ControlTemplate x:Key="Excel2007BlueThemeSearchTextBoxTemplate"
                    TargetType="sllb:SearchTextBox">
      <Grid x:Name="RootElement">
         <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="CommonStates">
               <VisualState x:Name="Normal" />

               <VisualState x:Name="Disabled">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="RootElement"
                                      Storyboard.TargetProperty="Opacity"
                                      Duration="0"
                                      To=".40" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="MouseOver">
                  <Storyboard>
                     <ColorAnimation Duration="0"
                                     To="#FF2F77D4"
                                     Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Color)"
                                     Storyboard.TargetName="border" />
                  </Storyboard>
               </VisualState>
               <VisualState x:Name="Pressed">
                  <Storyboard>
                     <ColorAnimation Duration="0"
                                     To="#FF2F77D4"
                                     Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Color)"
                                     Storyboard.TargetName="border" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="ReadOnly" />
            </VisualStateGroup>

            <VisualStateGroup x:Name="WatermarkStates">
               <VisualState x:Name="WatermarkVisible">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="WatermarkPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0.7"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>

               <VisualState x:Name="WatermarkHidden">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="WatermarkPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0"
                                      Duration="00:00:00.000" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FilterStates">
               <VisualState x:Name="NoFilter" />
               <VisualState x:Name="HasFilter">
                  <Storyboard>
                     <DoubleAnimation Storyboard.TargetName="searchIconPresenter"
                                      Storyboard.TargetProperty="Opacity"
                                      To="0"
                                      Duration="00:00:00.000" />
                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="ClearFilterButton">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
               </VisualState>

               <!-- Filter is too complex or too large to be displayed, only display filterTooComplexTextBlock-->
               <VisualState x:Name="TooComplex">
                  <Storyboard>
                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="ContentElement">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="WatermarkPresenter">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Collapsed</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                     <ObjectAnimationUsingKeyFrames Duration="0"
                                                    Storyboard.TargetProperty="Visibility"
                                                    Storyboard.TargetName="FilterTooComplexTextBlock">
                        <DiscreteObjectKeyFrame KeyTime="0">
                           <DiscreteObjectKeyFrame.Value>
                              <Visibility>Visible</Visibility>
                           </DiscreteObjectKeyFrame.Value>
                        </DiscreteObjectKeyFrame>
                     </ObjectAnimationUsingKeyFrames>

                  </Storyboard>
               </VisualState>
            </VisualStateGroup>

            <VisualStateGroup x:Name="FocusStates">
               <VisualState x:Name="Unfocused" />
               <VisualState x:Name="Focused">
                  <Storyboard>
                     <ColorAnimation Duration="0"
                                     To="#FF2F77D4"
                                     Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Color)"
                                     Storyboard.TargetName="border" />
                  </Storyboard>
               </VisualState>
            </VisualStateGroup>


         </VisualStateManager.VisualStateGroups>

         <Border x:Name="border"
                 CornerRadius="10"
                 Grid.ColumnSpan="2">
            <Border.Effect>
               <DropShadowEffect ShadowDepth="0"
                                 Color="#FF7B95B6"
                                 BlurRadius="6"
                                 Opacity="0.75" />
            </Border.Effect>
            <Border.Background>
               <LinearGradientBrush EndPoint="0.5,1"
                                    StartPoint="0.5,0">
                  <GradientStop Color="White"
                                Offset="1" />
                  <GradientStop Color="#FFF4F5F6" />
               </LinearGradientBrush>
            </Border.Background>
         </Border>

         <Grid Margin="0,0,0,0">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="*" />
               <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <ScrollViewer x:Name="ContentElement"
                          VerticalAlignment="Center"
                          Margin="8,0,0,0"
                          Foreground="White"
                          Padding="{TemplateBinding Padding}"
                          BorderThickness="0"
                          IsTabStop="False" />

            <ContentPresenter x:Name="WatermarkPresenter"
                              VerticalAlignment="Center"
                              Margin="8,0,0,0"
                              IsHitTestVisible="False"
                              Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WatermarkContent, Mode=OneWay}"
                              ContentTemplate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=WatermarkContentTemplate, Mode=OneWay}" />

            <TextBlock x:Name="FilterTooComplexTextBlock"
                       Text="{TemplateBinding TooComplexText}"
                       Visibility="Collapsed" />
            <ContentPresenter x:Name="searchIconPresenter"
                              Margin="0,0,6,0"
                              HorizontalAlignment="Center"
                              VerticalAlignment="Center"
                              Grid.Column="1"
                              IsHitTestVisible="False">
               <Path x:Name="searchIcon"
                     Height="15.482994079589844"
                     Width="15.4462890625"
                     Stretch="Fill"
                     Opacity="1"
                     Data="M 13.68194580078125,10.379951477050781 C16.034423828125,8.005409240722656 16.034423828125,4.1550140380859375 13.68194580078125,1.7809066772460938 11.3294677734375,-0.5936355590820312 7.51531982421875,-0.5936355590820312 5.163330078125,1.7809066772460938 3.22637939453125,3.7360000610351562 2.8876953125,6.690315246582031 4.1407470703125,8.999420166015625 4.1407470703125,8.999420166015625 0.194580078125,13.024307250976562 0.194580078125,13.024307250976562 -0.185791015625,13.408218383789062 0.00872802734375,14.225440979003906 0.6273193359375,14.85028076171875 1.245849609375,15.4742431640625 2.05596923828125,15.67010498046875 2.43585205078125,15.287055969238281 2.43585205078125,15.287055969238281 6.34381103515625,11.300300598144531 6.34381103515625,11.300300598144531 8.65679931640625,12.691230773925781 11.69183349609375,12.388778686523438 13.68194580078125,10.379951477050781 zM 7.2255859375,8.297897338867188 C6.01239013671875,7.0733642578125 6.0128173828125,5.087066650390625 7.22601318359375,3.8629684448242188 8.438720703125,2.638427734375 10.406494140625,2.638427734375 11.61968994140625,3.8629684448242188 12.83197021484375,5.086631774902344 12.83282470703125,7.07379150390625 11.61968994140625,8.298332214355469 10.40740966796875,9.522430419921875 8.4378662109375,9.522003173828125 7.2255859375,8.297897338867188 z"
                     Fill="#9EB6CE" />
            </ContentPresenter>


            <Button x:Name="ClearFilterButton"
                    Visibility="Collapsed"
                    Grid.Column="1"
                    IsTabStop="False"
                    Command="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ClearFilterCommand}"
                    Style="{StaticResource Excel2007BlueThemeClearFilterControlButtonStyle}">
               <Path Height="8.485282897949219"
                     Width="8.4853515625"
                     Stretch="Fill"
                     Opacity="1"
                     Data="M 691.828369140625,108.75736236572266 C691.828369140625,108.75736236572266 689,111.58578491210938 689,111.58578491210938 689,111.58578491210938 686.171630859375,108.75736236572266 686.171630859375,108.75736236572266 686.171630859375,108.75736236572266 684.75732421875,110.17156982421875 684.75732421875,110.17156982421875 684.75732421875,110.17156982421875 687.5858154296875,113 687.5858154296875,113 687.5858154296875,113 684.75732421875,115.82843017578125 684.75732421875,115.82843017578125 684.75732421875,115.82843017578125 686.171630859375,117.24264526367188 686.171630859375,117.24264526367188 686.171630859375,117.24264526367188 689,114.41421508789062 689,114.41421508789062 689,114.41421508789062 691.828369140625,117.24264526367188 691.828369140625,117.24264526367188 691.828369140625,117.24264526367188 693.24267578125,115.82843017578125 693.24267578125,115.82843017578125 693.24267578125,115.82843017578125 690.4141845703125,113 690.4141845703125,113 690.4141845703125,113 693.24267578125,110.17156982421875 693.24267578125,110.17156982421875 693.24267578125,110.17156982421875 691.828369140625,108.75736236572266 691.828369140625,108.75736236572266 z"
                     Fill="#859dbb"
                     HorizontalAlignment="Center"
                     VerticalAlignment="Center"
                     UseLayoutRounding="False"
                     Grid.Column="1"
                     Margin="0,0,3,0" />
            </Button>
         </Grid>

      </Grid>
   </ControlTemplate>

   <!--**************************
    * STYLE: SearchTextBox
    ************************** -->
   <Style x:Key="Excel2007BlueThemeSearchTextBoxStyle"
          TargetType="sllb:SearchTextBox">

      <Setter Property="Height"
              Value="24" />

      <Setter Property="VerticalAlignment"
              Value="Top" />

      <Setter Property="Foreground"
              Value="#769DC4" />

      <Setter Property="FontStyle"
              Value="Italic" />

      <Setter Property="Padding"
              Value="0" />

      <Setter Property="WatermarkContent"
              Value="Search" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeSearchTextBoxTemplate}" />
   </Style>

   <!--**************************
    * Style: DataNavigationControl
    ************************** -->
   <Style x:Key="Excel2007BlueThemeDataNavigationControlStyle"
          TargetType="sllb:DataNavigationControl">
      <Setter Property="Background"
              Value="{StaticResource Excel2007BlueThemeListBoxGroupHearderItemBackgroundBrush}" />

      <Setter Property="BorderBrush"
              Value="{StaticResource Excel2007BlueThemeListBoxDefaultBorderBrush}" />

      <Setter Property="ItemsPanel">
         <Setter.Value>
            <ItemsPanelTemplate>
               <sllb:UniformGrid x:Name="KeysHost"
                                 Orientation="Horizontal"
                                 Columns="5"
                                 Rows="{Binding RelativeSource={RelativeSource Self}, Path=Children.Count, Converter={StaticResource Excel2007BlueThemeDividendDivisorToCeilingQuotientConverter}, ConverterParameter=5}" />
            </ItemsPanelTemplate>
         </Setter.Value>
      </Setter>

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeDataNavigationControlTemplate}" />
   </Style>

   <!--**************************
    * STYLE: DataNavigationItem
    ************************** -->
   <Style x:Key="Excel2007BlueThemeDataNavigationItemStyle"
          TargetType="sllb:DataNavigationItem">

      <Setter Property="IsTabStop"
              Value="False" />

      <Setter Property="HorizontalContentAlignment"
              Value="Center" />

      <Setter Property="VerticalContentAlignment"
              Value="Center" />

      <Setter Property="Background"
              Value="#FFD9E1EC" />

      <Setter Property="BorderBrush"
              Value="{StaticResource Excel2007BlueThemeListBoxDefaultBorderBrush}" />

      <Setter Property="BorderThickness"
              Value="0" />

      <Setter Property="Margin"
              Value="3" />

      <Setter Property="Foreground"
              Value="#FF7898C2" />

      <Setter Property="Template"
              Value="{StaticResource Excel2007BlueThemeDataNavigationItemTemplate}" />
   </Style>

</ResourceDictionary>
